<template>
  <div>
    <div class="main" v-if="Pdata.length">
      <comment-model v-for="(item,i) in Pdata" :key="i" :Pdata="item" />
      <div class="more">
        <span>没有更多数据了</span>
      </div>
    </div>
    <div v-else class="false">
      <img src="@/assets/NotFound.png" alt="">
      <p>暂时没有收藏哟</p>
    </div>
  </div>
</template>

<script>
import CommentModel from "@/components/CommentModel.vue";
export default {
  components: { CommentModel },
  data() {
    return {
      Pdata: [],
    };
  },
  mounted () {
    this.axios.get('/user/bookList?id='+this.$route.query.id).then(res=>{
      // console.log(res)
      this.Pdata.push(...res.data.data)
      console.log(this.Pdata)
    })
  },
};
</script>

<style scoped>
.main {
  padding: 10px 30px;
}
.more {
  text-align: center;
  margin-top: 20px;
}
.more span {
  padding: 10px;
  background: #4cc3ff;
  color: #fff;
  border-radius: 8px;
}
.false{
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}
.false img{
  width: 30%;
  margin-bottom: 10px;
}
</style>